package com.bdqn.wf4.cinbase.util;

import java.io.Serializable;
import java.util.List;

public class PageData<T> implements Serializable {

	
	public PageData() {
		super();
	}
	
	public PageData(int pageIndex, int pageSize, int totalCount, List list) {
		super();
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.totalPageCount=this.totalCount%this.pageSize==0?this.totalCount/this.pageSize:this.totalCount/this.pageSize+1;
		this.list = list;
	}

	private int pageIndex;
	private int pageSize;
	private int totalCount;
	private int totalPageCount;
	private List list;
	
	private boolean hasPreous;
	private boolean hasNext;
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getTotalPageCount() {
		return totalPageCount;
	}
	public void setTotalPageCount(int totalPageCount) {
		this.totalPageCount = totalPageCount;
	}
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}

	public boolean isHasPreous() {
		return this.pageIndex>1;
	}

	public boolean isHasNext() {
		return this.pageIndex<this.totalPageCount;
	}
	

	
}
